<template>
  <div>
    <tablePaging :tableItem="tableItem" :operationItem="operationItem"/>
  </div>
</template>

<script setup>
import tablePaging from '@/views/common/component/table-paging'
import { onMounted, reactive, ref, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { download } from "@/utils/request";
import {
  tableItem,
  operationItem
} from './const.js'
import { ElMessage } from 'element-plus'
const router = useRouter()
const { proxy } = getCurrentInstance();
// 搜索
operationItem.menuArray[0].handle = () => {
  clickSearch()
}
// 导出
operationItem.menuArray[1].handle = () => {
  clickExport()
}

function clickSearch() {
  tableItem.pageInfo.paging()
}
function clickExport() {
  let url = '/sale/commission/export'
  let fileName = '分佣明细表'
  download(url, tableItem.pageInfo.request, fileName, {}, {})
}

onMounted(() => {
})

</script>
<style></style>
